import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    redirect:"/home"
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/Home.vue')
  },{
    path: '/project',
    name: 'Project',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/Project.vue')
  },{
    path: '/computer',
    name: 'Computer',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/computer')
  },{
    path: '/literature',
    name: 'Literature',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/literature')
  },{
    path: '/motivational',
    name: 'Motivational',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/motivational')
  },{
    path: '/children',
    name: 'Children',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/children')
  },{
    path: '/novel',
    name: 'Novel',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/novel')
  },{
    path: '/original',
    name: 'Original',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/original')
  },{
    path: '/technology',
    name: 'Technology',
    meta: {
      scrollToTop: true
    },
    component: () => import('../views/technology')
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
